package com.github.xtranslation.core.resolver;


import com.github.xtranslation.core.dto.Result;
/**
 * ResultResolver:解析 Result对象
 * @author zhangxiaoxiang
 * @since 2025/9/7
 */
public class ResultResolver implements WrapperObjectResolver {
    @Override
    public boolean needResolve(Object obj) {
        return obj instanceof Result;
    }

    @Override
    public Object unwrapTargetObject(Object obj) {
        return ((Result<?>) obj).getData();
    }

}
